using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Scalextric
{
    public class LEDStatus
    {
        public bool LED1 { get; set; }
        public bool LED2 { get; set; }
        public bool LED3 { get; set; }
        public bool LED4 { get; set; }
        public bool LED5 { get; set; }
        public bool LED6 { get; set; }
        public bool RedLED { get; set; }
        public bool GreenLED { get; set; }

        public LEDStatus(byte data)
        {
            BitArray bData = new BitArray(data);
            if (bData.Count != 8)
                throw new Exception();
            LED1 = bData[0];
            LED2 = bData[1];
            LED3 = bData[2];
            LED4 = bData[3];
            LED5 = bData[4];
            LED6 = bData[5];
            RedLED = bData[6];
            GreenLED = bData[7];
        }
    }
}
